import React from 'react'
import propTypes from 'prop-types'
import {classHelper} from '../utils/class'
import style from '../assets/css/linkItem.css'

class linkItem extends React.Component {
  constructor() {
    super();
    this.state = {}
  }

  render() {
    const props = this.props;
    return (
      <a href={props.href}  className={classHelper([props.arrow?style.arrow:'',props.className])} >
        <span>{props.text}</span>
      </a>
    )
  }
}

linkItem.propTypes = {
  arrow: propTypes.bool,
  className: propTypes.string,
  href: propTypes.string.isRequired,
  text:propTypes.string.isRequired
};
linkItem.defaultProps = {
  arrow: false,
};
export default linkItem;
